# 消息归档
# 修改8-10的程序，在调用函数send_messages()时，向它传递消息列表的副本。调用函数send_messages() 后，将两个列表都打印出来，确认保留了原始列表中的消息

def show_messages(messages):
    for message in messages:
        print(message)


def send_messages(messages, sent_messages):
    while messages:
        sent_messages.append(messages.pop())


messages = ["gaoshi", "想回去"]
sent_messages = []
send_messages(messages[:], sent_messages)

print("\nmessages:")
show_messages(messages)

print("\nsent_messages:")
show_messages(sent_messages)
